package com.andreamerla.petslife.activity;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import com.andreamerla.petslife.R;

public class HomeActivity extends ActionBarActivity implements View.OnClickListener {
    private Button btCiboCompleto;
    private Button btFoodDose;
    private Button btVetMap;
    private Button btVetSearch;
    private Button btForm;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.home_layout);

        btCiboCompleto = (Button) findViewById(R.id.bt_cibo_completo);
        btCiboCompleto.setOnClickListener(this);
        btFoodDose = (Button) findViewById(R.id.bt_food_dose);
        btFoodDose.setOnClickListener(this);
        btVetMap = (Button) findViewById(R.id.bt_vet_map);
        btVetMap.setOnClickListener(this);
        btVetSearch = (Button) findViewById(R.id.bt_vet_search);
        btVetSearch.setOnClickListener(this);
        btForm = (Button) findViewById(R.id.bt_form);
        btForm.setOnClickListener(this);
    }

    public void onClick(View view) {
        if (view == btCiboCompleto) {
            Intent intent = new Intent(this, CiboCompletoActivity.class);
            startActivity(intent);
        } else if (view == btFoodDose) {
            Intent intent = new Intent(this, FoodDoseActivity.class);
            startActivity(intent);
        } else if (view == btVetMap) {
            Intent intent = new Intent(this, VetMapActivity.class);
            startActivity(intent);
        } else if (view == btVetSearch) {
            Intent intent = new Intent(this, VetSearchActivity.class);
            startActivity(intent);
        } else if (view == btForm) {
            Intent intent = new Intent(this, VetFormActivity.class);
            startActivity(intent);
        }
    }
}
